#ifndef SUBPRODUCTDIALOG_H
#define SUBPRODUCTDIALOG_H

#include <QDialog>
#include <QStandardItemModel>
#include <QString>
#include <QDebug>

#include "database.h"
#include "useful.h"

namespace Ui {
class subProductDialog;
}

class subProductDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit subProductDialog(QStandardItemModel *mainModel, QWidget *parent=0);
    ~subProductDialog();
    void save();
    
private slots:
    void on_AddHalfProduct_clicked();

    void on_InsertHalfProduct_clicked();

    void on_RemoveHalfProduct_clicked();

    void on_Close_clicked();

    void on_Save_clicked();

    void on_Cancel_clicked();

private:
    Ui::subProductDialog *ui;
    QStandardItemModel *model;
    QStandardItemModel *parentModel;
    DataBase *mainBase;
};

#endif // SUBPRODUCTDIALOG_H
